package day_2022_4_to_7.day48;

import java.util.Scanner;

/**
 * 查找组成一个偶数最接近的两个素数
 * @author haomin
 * @date 2022/05/07 11:58
 **/
public class Day12_2_TwoClosestPrimeNum {
    public static void main(String[] args){
        int first = 0;
        int second = 0;
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        int i = 1;
        int j = num-i;
        while (i<=j){
            if(isPrimeNum(i) && isPrimeNum(j)){
                first = i;
                second = j;
            }
            i++;
            j--;
        }
        System.out.println(first);
        System.out.println(second);
    }

    private static boolean isPrimeNum(int num) {
        int count = 0;
        for (int i = 1; i < num; i++) {
            if(num % i == 0){
                count++;
            }
        }
        return count == 1 ? true : false;
    }
}